package com.messi.languagehelper;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;

public class About extends Activity implements OnClickListener {

	private LinearLayout weibo_layout, qq_layout, email_layout;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.about);
		init();
	}

	private void init() {
		weibo_layout = (LinearLayout) findViewById(R.id.weibo_layout);
		qq_layout = (LinearLayout) findViewById(R.id.qq_layout);
		email_layout = (LinearLayout) findViewById(R.id.email_layout);
		weibo_layout.setOnClickListener(this);
		qq_layout.setOnClickListener(this);
		email_layout.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.weibo_layout:
			Intent intent = new Intent();
			intent.setClass(this, WebViewActivity.class);
			intent.putExtra(WebViewActivity.URL,"http://weibo.com/messililu");
			startActivity(intent);
			break;
		case R.id.email_layout:
			Intent emailIntent = new Intent(Intent.ACTION_SEND);
			emailIntent.setType("message/rfc822");
			emailIntent.putExtra(Intent.EXTRA_EMAIL,
					new String[] { "meixililulu@163.com" });
			startActivity(emailIntent);
			break;
		default:
			break;
		}
	}
}
